#include <iostream>
using namespace std;
int* invert (int a[10]){
    int temp;
  for(int i=0;i<=4;i++){
   temp=a[i];
   a[i]=a[9-i];
   a[9-i]=temp;
  }
return a;
}

int main()
{
   int arr[10],i;
   for(i=0;i<=9;i++){
    arr[i]=i+1;
    cout<<arr[i]<<" ";
   }
          cout<<"\n";
   for(i=0;i<=9;i++){
    cout<<invert(arr)[i]<<" ";
   }
    return 0;
}
